package com.business.model.pessoa;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.*;

import org.hibernate.envers.Audited;

/**
 * @author Rodrigo
 * @version 1.0
 * @created 08-fev-2015 19:12:07
 */
@Audited
@Entity
public class DocCNPJ implements Serializable {

	private static final long serialVersionUID = 9158132743205881280L;

	@Id
	@OneToOne
	@JoinColumn(name="IdDocumento")
	private DocumentoPessoa Documento;
	
	@Column(length = 60)
	private String CNPJ;
	
	@Column(length = 60)
	private String RazaoSocial;
	
	@Column(length = 60)
	private String NomeFantasia;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="IdSituacao")
    private Situacao Situacao;
	
	@Column
	private Date DataEmissao;

	public DocCNPJ(){

	}

	public void finalize() throws Throwable {

	}

	public DocumentoPessoa getDocumento(){
		return Documento;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setDocumento(DocumentoPessoa newVal){
		Documento = newVal;
	}

	public String getCNPJ(){
		return CNPJ;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setCNPJ(String newVal){
		CNPJ = newVal;
	}

	public String getRazaoSocial(){
		return RazaoSocial;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setRazaoSocial(String newVal){
		RazaoSocial = newVal;
	}

	public String getNomeFantasia(){
		return NomeFantasia;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setNomeFantasia(String newVal){
		NomeFantasia = newVal;
	}

	public Situacao getSituacao(){
		return Situacao;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setSituacao(Situacao newVal){
		Situacao = newVal;
	}

	public Date getDataEmissao(){
		return DataEmissao;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setDataEmissao(Date newVal){
		DataEmissao = newVal;
	}

}